package com.yipinhouse.backstage.client.param;

import com.fasterxml.jackson.annotation.JsonFilter;
import com.yipinhouse.house.client.enums.EnumValue;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class InsertApartmentWebParam implements Serializable {

    /**
     * 居室
     */
    @EnumValue(strValues={"ONE","TWO","THREE","FOUR","FIVE","SIX"}, message="居室信息错误")
    private String room;

    /**
     * 户型图
     */
    @NotNull(message="图片信息不能为空")
    private MultipartFile file;

    /**
     * 朝向
     */
    @EnumValue(strValues = {"EAST","SOUTH","WEST","NORTH","SOUTHEAST","SOUTHWEST","NORTHEAST","NORTHWEST"}, message="朝向信息有误")
    private String toward;

    /**
     * 面积
     */
    @NotNull(message = "面积不能为空")
    @Min(0)
    private Double area;

    /**
     * 关联楼盘id
     */
    @NotNull(message="楼盘信息不能为空")
    @Min(0)
    private Integer buildingId;

    /**
     * 均价
     */
    @NotNull(message="均价不能为空")
    @Min(0)
    private BigDecimal averagePrice;
}
